//
//  SAPForumOneModel.m
//  CarsHome
//
//  Created by dapeng on 15/12/7.
//  Copyright © 2015年 dapeng. All rights reserved.
//

#import "SAPForumOneModel.h"

@implementation SAPForumOneModel
- (void)dealloc {
    [_listArray release];
    [super dealloc];
}
- (instancetype)initWithDataSource:(NSDictionary *)data {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:data];
    }
    return self;
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"list"]) {
        NSArray *array = value;
        NSMutableArray *mutableArray = [[NSMutableArray alloc] initWithCapacity:0];
        for (NSDictionary *dic in array) {
            SAPForumTwoModel *forumTwoModel = [[SAPForumTwoModel alloc] initWithDataSource:dic];
            [mutableArray addObject:forumTwoModel];
        }self.listArray = [NSMutableArray arrayWithArray:mutableArray];
    }
}
- (id)valueForUndefinedKey:(NSString *)key {
    return nil;
}
@end
